{% load admin_urls i18n %}

{% if views %}
  <div class="tabs vertical">
    <ul>
      <li
        class="has-tip tip-bottom {% if name == '' %} active {% endif %}"
        title="{{ view.label }}"
        data-tooltip
        aria-haspopup="true"
        data-options="show_on:small"
      >
        <a href="{{ object.get_absolute_url }}" title="{% trans "Basic info" %}" class="ellipsis-hidden">
          <i class="fa fa-info" aria-hidden="true"></i> <span class="tab-label">{% trans "Basic info" %}</span>
        </a>
      </li>
      {% for view in views %}
        <li
          class="has-tip tip-bottom {% if name == view.name %} active {% endif %}"
          title="{{ view.label }}"
          data-tooltip
          aria-haspopup="true"
          data-options="show_on:small"
        >
          <a href="
            {% if object.id %}
              {% url view.url_with_namespace object.id %}
            {% else %}
              {% url view.url_with_namespace %}
            {% endif %}
            " title="{{ view.label }}"
            class="ellipsis-hidden"
          />
            {% if view.icon %}
              <i class="fa fa-{{ view.icon }}" aria-hidden="true"></i>
            {% endif %}
            <span class="tab-label">{{ view.label }}</span>
            {# TODO: show some badge (ex. currently running transitions ) #}
          </a>
        </li>
      {% endfor %}
    </ul>
  </div>
{% endif %}
